home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 24 / Amiga Format AFCD24 (Feb 1998, Issue 108).iso / -seriously_amiga- / shareware / programming / other / apic / examples / keyboard.lha / IBMKEY25.lst < prev    next >
File List  |  1997-01-28  |  87KB  |  1,663 lines

  1. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE  1
  2.  
  3.  
  4. LOC  OBJECT CODE     LINE SOURCE TEXT
  5.   VALUE
  6.  
  7.                     00001 ;KEY.ASM
  8.                     00002 ;   IBM keyboard to Amiga Converter
  9.                     00003 ;
  10.                     00004 ;
  11.                     00005         list p=16c84, f=inhx8m  ;Enter device name 
  12.                     00006         include "p16c84.inc"
  13.                     00001         LIST
  14.                     00002 ; P16C84.INC  Standard Header File, Version 1.00    Microchip Technology, Inc.
  15.                     00134         LIST
  16.                     00007 
  17.                     00008 
  18.                     00009 #DEFINE PAGE0   bcf     STATUS,RP0          
  19.                     00010 #DEFINE PAGE1   bsf     STATUS,RP0          
  20.                     00011 
  21.                     00012 ;
  22.                     00013 ;------------------------------------------------------
  23.                     00014 ;Please define ScratchPadRam here:
  24.                     00015 ;If you are using PIC16C5X define "ScratchPadRam equ 0x10" 
  25.                     00016 ;else define "ScratchPadRam equ 0x20"
  26.                     00017 ;-------------------------------------------------------
  27.                     00018 ;
  28.   00000000          00019 ScrollLock  equ     0x0
  29.   00000001          00020 NumLock     equ     0x1
  30.   00000002          00021 CapsLock    equ     0x2
  31.   00000001          00022 Kclk        equ     0x1
  32.   00000000          00023 Kdat        equ     0x0
  33.   00000004          00024 Aclk        equ     0x4
  34.   00000003          00025 Adat        equ     0x3
  35.   00000002          00026 Arst        equ     0x2
  36.   00000000          00027 Ctrlbit     equ     0x0
  37.   00000001          00028 RAmigabit   equ     0x1
  38.   00000002          00029 LAmigabit   equ     0x2
  39.   00000000          00030 Keytype     equ     0x0
  40.   00000001          00031 Resetype    equ     0x1
  41.                     00032 ;
  42.                     00033 ;
  43.   0000000C          00034 ScratchPadRam   equ     0x0C
  44.                     00035 ;
  45.   0000000C          00036 Capbit      equ     ScratchPadRam+0x0
  46.   0000000D          00037 Capdown     equ     ScratchPadRam+0x1
  47.   0000000E          00038 CtrlDown    equ     ScratchPadRam+0x2
  48.   0000000F          00039 RESET       equ     ScratchPadRam+0x3
  49.   00000010          00040 Lights      equ     ScratchPadRam+0x4
  50.   00000011          00041 Count3      equ     ScratchPadRam+0x5
  51.   00000012          00042 ATparity    equ     ScratchPadRam+0x6
  52.   00000013          00043 Make        equ     ScratchPadRam+0x7
  53.   00000014          00044 Charbad     equ     ScratchPadRam+0x8
  54.   00000015          00045 Oldchar     equ     ScratchPadRam+0x9
  55.   00000016          00046 Amigachar   equ     ScratchPadRam+0xA
  56.   00000017          00047 Count1      equ     ScratchPadRam+0xB
  57.   00000018          00048 Count2      equ     ScratchPadRam+0xC
  58.   00000019          00049 ATchar      equ     ScratchPadRam+0xD
  59.   0000001A          00050 tableoffset equ     ScratchPadRam+0xE
  60. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE  2
  61.  
  62.  
  63. LOC  OBJECT CODE     LINE SOURCE TEXT
  64.   VALUE
  65.  
  66.   0000001B          00051 AltConfig   equ     ScratchPadRam+0xF
  67.   0000001C          00052 Savechar    equ     ScratchPadRam+0x10
  68.   0000001D          00053 returnvalue equ     ScratchPadRam+0x11
  69.   0000001E          00054 eeaddress   equ     ScratchPadRam+0x12
  70.   0000001F          00055 eedata      equ     ScratchPadRam+0x13
  71.   00000020          00056 win95       equ     ScratchPadRam+0x14
  72.   00000021          00057 Savechar2   equ     ScratchPadRam+0x15
  73.                     00058 ;
  74.                     00059 ;        
  75. 0000                00060         org     0x0
  76. 0000 2A64           00061         goto    start
  77.                     00062 
  78. 0001                00063 ATtb1 
  79. 0001 0082           00064         movwf       PCL                  
  80. 0002 344F           00065         retlw       0x4F            ;F9
  81. 0003 3400           00066         retlw       0x0               
  82. 0004 3457           00067         retlw       0x57            ;F5
  83. 0005 345B           00068         retlw       0x5B            ;F3
  84. 0006 345F           00069         retlw       0x5F            ;F1
  85. 0007 345D           00070         retlw       0x5D            ;F2
  86. 0008 3441           00071         retlw       0x41            ;F12=help
  87. 0009 3400           00072         retlw       0x0
  88. 000A 344D           00073         retlw       0x4D            ;F10
  89. 000B 3451           00074         retlw       0x51            ;F8
  90. 000C 3455           00075         retlw       0x55            ;F6
  91. 000D 3459           00076         retlw       0x59            ;F4
  92. 000E 347B           00077         retlw       0x7B            ;TAB
  93. 000F 34FF           00078         retlw       0xFF            ;~
  94. 0010 3400           00079         retlw       0x0
  95.                     00080 
  96. 0011 3400           00081         retlw       0x0
  97. 0012 3437           00082         retlw       0x37            ;Left ALT
  98. 0013 343F           00083         retlw       0x3F            ;Left SHIFT
  99. 0014 3400           00084         retlw       0x0
  100. 0015 2900           00085         goto    lctrl               ;Left Ctrl
  101. 0016 34DF           00086         retlw       0xDF            ;Q
  102. 0017 34FD           00087         retlw       0xFD            ;1
  103. 0018 3400           00088         retlw       0x0
  104. 0019 3400           00089         retlw       0x0
  105. 001A 3400           00090         retlw       0x0
  106. 001B 349D           00091         retlw       0x9D            ;Z
  107. 001C 34BD           00092         retlw       0xBD            ;S
  108. 001D 34BF           00093         retlw       0xBF            ;A
  109. 001E 34DD           00094         retlw       0xDD            ;W
  110. 001F 34FB           00095         retlw       0xFB            ;2
  111. 0020 3400           00096         retlw       0x0
  112.                     00097 
  113. 0021 3400           00098         retlw       0x0
  114. 0022 3499           00099         retlw       0x99            ;C
  115. 0023 349B           00100         retlw       0x9B            ;X
  116. 0024 34BB           00101         retlw       0xBB            ;D
  117. 0025 34DB           00102         retlw       0xDB            ;E
  118. 0026 34F7           00103         retlw       0xF7            ;4
  119. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE  3
  120.  
  121.  
  122. LOC  OBJECT CODE     LINE SOURCE TEXT
  123.   VALUE
  124.  
  125. 0027 34F9           00104         retlw       0xF9            ;3
  126. 0028 3400           00105         retlw       0x0
  127. 0029 3400           00106         retlw       0x0
  128. 002A 347F           00107         retlw       0x7F            ;SPACE
  129. 002B 3497           00108         retlw       0x97            ;V
  130. 002C 34B9           00109         retlw       0xB9            ;F
  131. 002D 34D7           00110         retlw       0xD7            ;T
  132. 002E 34D9           00111         retlw       0xD9            ;R
  133. 002F 34F5           00112         retlw       0xF5            ;5
  134. 0030 3400           00113         retlw       0x0
  135.                     00114 
  136. 0031 3400           00115         retlw       0x0
  137. 0032 3493           00116         retlw       0x93            ;N
  138. 0033 3495           00117         retlw       0x95            ;B
  139. 0034 34B5           00118         retlw       0xB5            ;H
  140. 0035 34B7           00119         retlw       0xB7            ;G
  141. 0036 34D5           00120         retlw       0xD5            ;Y
  142. 0037 34F3           00121         retlw       0xF3            ;6
  143. 0038 3400           00122         retlw       0x0
  144. 0039 3400           00123         retlw       0x0
  145. 003A 3400           00124         retlw       0x0
  146. 003B 3491           00125         retlw       0x91            ;M
  147. 003C 34B3           00126         retlw       0xB3            ;J
  148. 003D 34D3           00127         retlw       0xD3            ;U
  149. 003E 34F1           00128         retlw       0xF1            ;7
  150. 003F 34EF           00129         retlw       0xEF            ;8
  151. 0040 3400           00130         retlw       0x0
  152.                     00131 
  153. 0041 3400           00132         retlw       0x0
  154. 0042 348F           00133         retlw       0x8F            ;<
  155. 0043 34B1           00134         retlw       0xB1            ;K
  156. 0044 34D1           00135         retlw       0xD1            ;I
  157. 0045 34CF           00136         retlw       0xCF            ;O
  158. 0046 34EB           00137         retlw       0xEB            ;0
  159. 0047 34ED           00138         retlw       0xED            ;9
  160. 0048 3400           00139         retlw       0x0
  161. 0049 3400           00140         retlw       0x0
  162. 004A 348D           00141         retlw       0x8D            ;>
  163. 004B 348B           00142         retlw       0x8B            ;/
  164. 004C 34AF           00143         retlw       0xAF            ;L
  165. 004D 34AD           00144         retlw       0xAD            ; ';'
  166. 004E 34CD           00145         retlw       0xCD            ;P
  167. 004F 34E9           00146         retlw       0xE9            ;-
  168. 0050 3400           00147         retlw       0x0
  169.                     00148 
  170. 0051 3400           00149         retlw       0x0
  171. 0052 3400           00150         retlw       0x0
  172. 0053 34AB           00151         retlw       0xAB            ;@
  173. 0054 3400           00152         retlw       0x0
  174. 0055 34CB           00153         retlw       0xCB            ;[
  175. 0056 34E7           00154         retlw       0xE7            ;=
  176. 0057 3400           00155         retlw       0x0
  177. 0058 3400           00156         retlw       0x0
  178. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE  4
  179.  
  180.  
  181. LOC  OBJECT CODE     LINE SOURCE TEXT
  182.   VALUE
  183.  
  184. 0059 343B           00157         retlw       0x3B            ;CAPS LOCK?
  185. 005A 343D           00158         retlw       0x3D            ;Right SHIFT
  186. 005B 3477           00159         retlw       0x77            ;RETURN
  187. 005C 34C9           00160         retlw       0xC9            ;]
  188. 005D 3400           00161         retlw       0x0
  189. 005E 34A9           00162         retlw       0xA9            ;#=right foreign key
  190. 005F 3400           00163         retlw       0x0
  191. 0060 3400           00164         retlw       0x0
  192.                     00165 
  193. 0061 3400           00166         retlw       0x0
  194. 0062 349F           00167         retlw       0x9F            ;\ (next to left shift on AT keyboard)
  195. 0063 3400           00168         retlw       0x0
  196. 0064 3400           00169         retlw       0x0
  197. 0065 3400           00170         retlw       0x0
  198. 0066 3400           00171         retlw       0x0
  199. 0067 347D           00172         retlw       0x7D            ;Back SPACE
  200. 0068 3400           00173         retlw       0x0
  201. 0069 3400           00174         retlw       0x0
  202. 006A 34C5           00175         retlw       0xC5            ;1 keypad
  203. 006B 3400           00176         retlw       0x0
  204. 006C 34A5           00177         retlw       0xA5            ;4 keypad
  205. 006D 3485           00178         retlw       0x85            ;7 keypad
  206. 006E 3400           00179         retlw       0x0
  207. 006F 3400           00180         retlw       0x0
  208. 0070 3400           00181         retlw       0x0
  209.                     00182 
  210. 0071 34E1           00183         retlw       0xE1            ;0 keypad
  211. 0072 3487           00184         retlw       0x87            ;dot keypad
  212. 0073 34C3           00185         retlw       0xC3            ;2 keypad
  213. 0074 34A3           00186         retlw       0xA3            ;5 keypad
  214. 0075 34A1           00187         retlw       0xA1            ;6 keypad
  215. 0076 3483           00188         retlw       0x83            ;8 keypad
  216. 0077 3475           00189         retlw       0x75            ;ESCAPE!
  217. 0078 344B           00190         retlw       0x4B            ;Number Lock=( keypad   
  218. 0079 34E5           00191         retlw       0xE5            ;F11=\
  219. 007A 3443           00192         retlw       0x43            ;+ keypad
  220. 007B 34C1           00193         retlw       0xC1            ;3 keypad
  221. 007C 346B           00194         retlw       0x6B            ;- keypad
  222. 007D 3445           00195         retlw       0x45            ;* keypad
  223. 007E 3481           00196         retlw       0x81            ;9 keypad
  224. 007F 3449           00197         retlw       0x49            ;scroll Lock=) keypad 
  225. 0080 3400           00198         retlw       0x0
  226.                     00199 
  227. 0081                00200 ATtb2:
  228. 0081 3400           00201         retlw       0x0
  229. 0082 3400           00202         retlw       0x0
  230. 0083 3400           00203         retlw       0x0
  231. 0084 3453           00204         retlw       0x53            ;F7
  232. 0085 290D           00205         goto    prtscreen           ;print screen=R Amiga P  
  233. 0086 3400           00206         retlw       0x0
  234. 0087 3400           00207         retlw       0x0
  235. 0088 3400           00208         retlw       0x0
  236. 0089 3400           00209         retlw       0x0
  237. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE  5
  238.  
  239.  
  240. LOC  OBJECT CODE     LINE SOURCE TEXT
  241.   VALUE
  242.  
  243. 008A 3400           00210         retlw       0x0
  244. 008B 3400           00211         retlw       0x0
  245. 008C 3400           00212         retlw       0x0
  246. 008D 3400           00213         retlw       0x0
  247. 008E 3400           00214         retlw       0x0
  248. 008F 3400           00215         retlw       0x0
  249. 0090 3400           00216         retlw       0x0
  250.                     00217 
  251. 0091 3400           00218         retlw       0x0
  252. 0092 3435           00219         retlw       0x35            ;Right ALT
  253. 0093 3400           00220         retlw       0x0
  254. 0094 3400           00221         retlw       0x0
  255. 0095 2903           00222         goto    rctrl               ;Right CTL
  256. 0096 3400           00223         retlw       0x0
  257. 0097 3400           00224         retlw       0x0
  258. 0098 3400           00225         retlw       0x0
  259. 0099 3400           00226         retlw       0x0
  260. 009A 3400           00227         retlw       0x0
  261. 009B 3400           00228         retlw       0x0
  262. 009C 3400           00229         retlw       0x0
  263. 009D 3400           00230         retlw       0x0
  264. 009E 3400           00231         retlw       0x0
  265. 009F 3400           00232         retlw       0x0
  266. 00A0 3433           00233         retlw       0x33            ;Left Win=Left Amiga
  267.                     00234 
  268. 00A1 3400           00235         retlw       0x0
  269. 00A2 3400           00236         retlw       0x0
  270. 00A3 3400           00237         retlw       0x0
  271. 00A4 3400           00238         retlw       0x0
  272. 00A5 3400           00239         retlw       0x0
  273. 00A6 3400           00240         retlw       0x0
  274. 00A7 3400           00241         retlw       0x0
  275. 00A8 3431           00242         retlw       0x31            ;Right Win=Right Amiga
  276. 00A9 3400           00243         retlw       0x0
  277. 00AA 3400           00244         retlw       0x0
  278. 00AB 3400           00245         retlw       0x0
  279. 00AC 3400           00246         retlw       0x0
  280. 00AD 3400           00247         retlw       0x0
  281. 00AE 3400           00248         retlw       0x0
  282. 00AF 3400           00249         retlw       0x0
  283. 00B0 2906           00250         goto    swapscreen          ;Menu Key=swapscreen
  284.                     00251         
  285. 00B1 3400           00252         retlw       0x0
  286. 00B2 3400           00253         retlw       0x0
  287. 00B3 3400           00254         retlw       0x0
  288. 00B4 3400           00255         retlw       0x0
  289. 00B5 3400           00256         retlw       0x0
  290. 00B6 3400           00257         retlw       0x0
  291. 00B7 3400           00258         retlw       0x0
  292. 00B8 3400           00259         retlw       0x0
  293. 00B9 3400           00260         retlw       0x0
  294. 00BA 3400           00261         retlw       0x0
  295. 00BB 3400           00262         retlw       0x0
  296. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE  6
  297.  
  298.  
  299. LOC  OBJECT CODE     LINE SOURCE TEXT
  300.   VALUE
  301.  
  302. 00BC 3400           00263         retlw       0x0
  303. 00BD 3400           00264         retlw       0x0
  304. 00BE 3400           00265         retlw       0x0
  305. 00BF 3400           00266         retlw       0x0
  306. 00C0 3400           00267         retlw       0x0
  307.                     00268 
  308. 00C1 3400           00269         retlw       0x0
  309. 00C2 3400           00270         retlw       0x0
  310. 00C3 3400           00271         retlw       0x0
  311. 00C4 3400           00272         retlw       0x0
  312. 00C5 3400           00273         retlw       0x0
  313. 00C6 3400           00274         retlw       0x0
  314. 00C7 3400           00275         retlw       0x0
  315. 00C8 3400           00276         retlw       0x0
  316. 00C9 3400           00277         retlw       0x0
  317. 00CA 3400           00278         retlw       0x0
  318. 00CB 348B           00279         retlw       0x8B            ;/key, supposedly
  319. 00CC 3400           00280         retlw       0x0
  320. 00CD 3400           00281         retlw       0x0
  321. 00CE 3400           00282         retlw       0x0
  322. 00CF 3400           00283         retlw       0x0
  323. 00D0 3400           00284         retlw       0x0
  324.                     00285 
  325. 00D1 3400           00286         retlw       0x0
  326. 00D2 3400           00287         retlw       0x0
  327. 00D3 3400           00288         retlw       0x0
  328. 00D4 3400           00289         retlw       0x0
  329. 00D5 3400           00290         retlw       0x0
  330. 00D6 3400           00291         retlw       0x0
  331. 00D7 3400           00292         retlw       0x0
  332. 00D8 3400           00293         retlw       0x0
  333. 00D9 3400           00294         retlw       0x0
  334. 00DA 3400           00295         retlw       0x0
  335. 00DB 3479           00296         retlw       0x79            ;Numeric Enter
  336. 00DC 3400           00297         retlw       0x0
  337. 00DD 3400           00298         retlw       0x0
  338. 00DE 3400           00299         retlw       0x0
  339. 00DF 3400           00300         retlw       0x0
  340. 00E0 3400           00301         retlw       0x0
  341.                     00302 
  342. 00E1 3400           00303         retlw       0x0
  343. 00E2 3400           00304         retlw       0x0
  344. 00E3 3400           00305         retlw       0x0
  345. 00E4 3400           00306         retlw       0x0
  346. 00E5 3400           00307         retlw       0x0
  347. 00E6 3400           00308         retlw       0x0
  348. 00E7 3400           00309         retlw       0x0
  349. 00E8 3400           00310         retlw       0x0
  350. 00E9 3400           00311         retlw       0x0
  351. 00EA 2914           00312         goto    endkey              ;End=Shift right-cursor  
  352. 00EB 3400           00313         retlw       0x0
  353. 00EC 3461           00314         retlw       0x61            ;Cursor Left
  354. 00ED 291B           00315         goto    home                ;Home=Shift left-cursor  
  355. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE  7
  356.  
  357.  
  358. LOC  OBJECT CODE     LINE SOURCE TEXT
  359.   VALUE
  360.  
  361. 00EE 3400           00316         retlw       0x0
  362. 00EF 3400           00317         retlw       0x0
  363. 00F0 3463           00318         retlw       0x63            ;MACRO key=control
  364.                     00319 
  365. 00F1 2930           00320         goto    insert              ;Insert=Right Amiga 7
  366. 00F2 3473           00321         retlw       0x73            ;Delete
  367. 00F3 3465           00322         retlw       0x65            ;Cursor Down
  368. 00F4 3400           00323         retlw       0x0
  369. 00F5 3463           00324         retlw       0x63            ;Cursor Right
  370. 00F6 3467           00325         retlw       0x67            ;Cursor Up
  371. 00F7 3400           00326         retlw       0x0
  372. 00F8 3400           00327         retlw       0x0
  373. 00F9 3400           00328         retlw       0x0
  374. 00FA 3400           00329         retlw       0x0
  375. 00FB 2922           00330         goto    pagedown            ;Page Down=Shift down-cursor
  376. 00FC 3400           00331         retlw       0x0
  377. 00FD 290D           00332         goto    prtscreen           ;print screen=Right Amiga P
  378. 00FE 2929           00333         goto    pageup              ;Page up=Shift up-cursor
  379. 00FF 2937           00334         goto    break               ;Break=Ctrl-C
  380.                     00335 ;        retlw       0x0
  381.                     00336 
  382.                     00337 
  383.                     00338 
  384.                     00339 ; *** Left Control key ***
  385. 0100                00340 lctrl
  386. 0100 1820           00341         btfsc   win95,0x0
  387. 0101 3439           00342         retlw   0x39                ; ctrl
  388. 0102 3433           00343         retlw   0x33                ; left Amiga
  389.                     00344 
  390.                     00345 ; *** Right Control key ***
  391. 0103                00346 rctrl
  392. 0103 1820           00347         btfsc   win95,0x0
  393. 0104 3439           00348         retlw   0x39                ; ctrl
  394. 0105 3431           00349         retlw   0x31                ; right Amiga
  395.                     00350         
  396.                     00351 
  397.                     00352 ; *** Menu = Left Amiga-M
  398. 0106                00353 swapscreen
  399. 0106 3033           00354         movlw   0x33                ; Left Amiga pressed
  400. 0107 21A0           00355         call    actualtransmit
  401. 0108 3091           00356         movlw   0x91                ; M pressed & released
  402. 0109 23B5           00357         call    sendmessage
  403. 010A 3032           00358         movlw   0x32                ; Left Amiga released
  404. 010B 21A0           00359         call    actualtransmit
  405. 010C 3400           00360         retlw   0x0          
  406.                     00361 
  407.                     00362 
  408.                     00363 ; *** Prt Scrn Key = Right Amiga-P
  409. 010D                00364 prtscreen
  410. 010D 3031           00365         movlw   0x31                ; Right Amiga pressed
  411. 010E 21A0           00366         call    actualtransmit
  412. 010F 30CD           00367         movlw   0xCD                ; P pressed & released
  413. 0110 23B5           00368         call    sendmessage
  414. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE  8
  415.  
  416.  
  417. LOC  OBJECT CODE     LINE SOURCE TEXT
  418.   VALUE
  419.  
  420. 0111 3030           00369         movlw   0x30                ; Right Amiga released
  421. 0112 21A0           00370         call    actualtransmit
  422. 0113 3400           00371         retlw   0x0          
  423.                     00372 
  424.                     00373 
  425.                     00374 
  426.                     00375 ; *** End Key = Shift right-cursor
  427. 0114                00376 endkey
  428. 0114 303D           00377         movlw   0x3D                ; Right shift pressed
  429. 0115 21A0           00378         call    actualtransmit
  430. 0116 3063           00379         movlw   0x63                ; right-cursor pressed & released
  431. 0117 23B5           00380         call    sendmessage
  432. 0118 303C           00381         movlw   0x3C                ; Right shift released
  433. 0119 21A0           00382         call    actualtransmit
  434. 011A 3400           00383         retlw   0x0          
  435.                     00384 
  436.                     00385 
  437.                     00386 
  438.                     00387 ; *** Home Key = Shift left-cursor
  439. 011B                00388 home
  440. 011B 303D           00389         movlw   0x3D                ; Right shift pressed
  441. 011C 21A0           00390         call    actualtransmit
  442. 011D 3061           00391         movlw   0x61                ; left-cursor pressed & released
  443. 011E 23B5           00392         call    sendmessage
  444. 011F 303C           00393         movlw   0x3C                ; Right shift released
  445. 0120 21A0           00394         call    actualtransmit
  446. 0121 3400           00395         retlw   0x0          
  447.                     00396 
  448.                     00397 
  449.                     00398 
  450.                     00399 ; *** PageDown Key = Shift down-cursor
  451. 0122                00400 pagedown
  452. 0122 303D           00401         movlw   0x3D                ; Right shift pressed
  453. 0123 21A0           00402         call    actualtransmit
  454. 0124 3065           00403         movlw   0x65                ; down-cursor pressed & released
  455. 0125 23B5           00404         call    sendmessage
  456. 0126 303C           00405         movlw   0x3C                ; Right shift released
  457. 0127 21A0           00406         call    actualtransmit
  458. 0128 3400           00407         retlw   0x0          
  459.                     00408 
  460.                     00409 
  461.                     00410 
  462.                     00411 ; *** Pageup Key = Shift up-cursor
  463. 0129                00412 pageup
  464. 0129 303D           00413         movlw   0x3D                ; Right shift pressed
  465. 012A 21A0           00414         call    actualtransmit
  466. 012B 3067           00415         movlw   0x67                ; up-cursor pressed & released
  467. 012C 23B5           00416         call    sendmessage
  468. 012D 303C           00417         movlw   0x3C                ; Right shift released
  469. 012E 21A0           00418         call    actualtransmit
  470. 012F 3400           00419         retlw   0x0          
  471.                     00420 
  472.                     00421 
  473. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE  9
  474.  
  475.  
  476. LOC  OBJECT CODE     LINE SOURCE TEXT
  477.   VALUE
  478.  
  479.                     00422 
  480.                     00423 ; *** Insert Key = Right Amiga 7
  481. 0130                00424 insert
  482. 0130 3031           00425         movlw   0x31                ; Right Amiga pressed
  483. 0131 21A0           00426         call    actualtransmit
  484. 0132 30F1           00427         movlw   0xF1                ; 7 pressed & released
  485. 0133 23B5           00428         call    sendmessage
  486. 0134 3030           00429         movlw   0x30                ; Right Amiga released
  487. 0135 21A0           00430         call    actualtransmit
  488. 0136 3400           00431         retlw   0x0          
  489.                     00432 
  490.                     00433 
  491.                     00434 
  492.                     00435 ; *** Break Key = Ctrl-C
  493. 0137                00436 break
  494. 0137 3039           00437         movlw   0x39                ; Ctrl pressed
  495. 0138 21A0           00438         call    actualtransmit
  496. 0139 3099           00439         movlw   0x99                ; C pressed & released
  497. 013A 23B5           00440         call    sendmessage
  498. 013B 3038           00441         movlw   0x38                ; Ctrl released
  499. 013C 21A0           00442         call    actualtransmit
  500. 013D 3400           00443         retlw   0x0          
  501.                     00444 
  502.                     00445 
  503.                     00446 
  504.                     00447 ; *** Wait a long time ***
  505. 013E                00448 longdelay
  506. 013E 0097           00449         movwf   Count1
  507. 013F                00450 dly
  508. 013F 2143           00451         call    fixeddelay
  509. 0140 0B97           00452         decfsz  Count1,F
  510. 0141 293F           00453         goto    dly
  511. 0142 0008           00454         return
  512.                     00455 ;
  513.                     00456 ; *** Wait a short while ***
  514. 0143                00457 fixeddelay
  515. 0143 30FF           00458         movlw   0xFF
  516. 0144                00459 smalldelay
  517. 0144 0098           00460         movwf   Count2
  518. 0145                00461 delay
  519. 0145 0B98           00462         decfsz  Count2,F
  520. 0146 2945           00463         goto    delay
  521. 0147 0008           00464         return
  522.                     00465 
  523.                     00466 
  524.                     00467 
  525.                     00468 
  526.                     00469 ; *** Send character to Amiga and wait for handshake ***
  527. 0148                00470 amigatransmit
  528. 0148 0096           00471         movwf   Amigachar
  529. 0149 0215           00472         subwf   Oldchar,W
  530. 014A 1903           00473         btfsc   STATUS,Z            ; skip if not equal
  531. 014B 0008           00474         return                      ; ignore it
  532. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 10
  533.  
  534.  
  535. LOC  OBJECT CODE     LINE SOURCE TEXT
  536.   VALUE
  537.  
  538.                     00475         
  539. 014C 3033           00476         movlw   0x33                ; LAmiga pressed
  540. 014D 0216           00477         subwf   Amigachar,W
  541. 014E 1903           00478         btfsc   STATUS,Z            ; skip if not equal
  542. 014F 110F           00479         bcf     RESET,LAmigabit
  543. 0150 3032           00480         movlw   0x32                ; LAmiga released
  544. 0151 0216           00481         subwf   Amigachar,W
  545. 0152 1903           00482         btfsc   STATUS,Z            ; skip if not equal
  546. 0153 150F           00483         bsf     RESET,LAmigabit
  547.                     00484                 
  548. 0154 3031           00485         movlw   0x31                ; RAmiga pressed
  549. 0155 0216           00486         subwf   Amigachar,W
  550. 0156 1903           00487         btfsc   STATUS,Z            ; skip if not equal
  551. 0157 108F           00488         bcf     RESET,RAmigabit
  552. 0158 3030           00489         movlw   0x30                ; RAmiga released
  553. 0159 0216           00490         subwf   Amigachar,W
  554. 015A 1903           00491         btfsc   STATUS,Z            ; skip if not equal
  555. 015B 148F           00492         bsf     RESET,RAmigabit
  556.                     00493                 
  557. 015C 303B           00494         movlw   0x3B                ; jump if not Capslock down
  558. 015D 0216           00495         subwf   Amigachar,W
  559. 015E 1D03           00496         btfss   STATUS,Z            ; skip if equal
  560. 015F 2966           00497         goto    transok2            ; ignore it
  561. 0160 100F           00498         bcf     RESET,Ctrlbit
  562. 0161 0816           00499         movf    Amigachar,W
  563. 0162 0095           00500         movwf   Oldchar
  564. 0163 30FF           00501         movlw   0xFF
  565. 0164 008D           00502         movwf   Capdown             ; set flags for later
  566. 0165 0008           00503         return
  567. 0166                00504 transok2
  568. 0166 303A           00505         movlw   0x3A                ; jump if not Capslock up
  569. 0167 0216           00506         subwf   Amigachar,W
  570. 0168 1D03           00507         btfss   STATUS,Z            ; skip if equal
  571. 0169 2984           00508         goto    transok3            ; ignore it
  572.                     00509 
  573. 016A 140F           00510         bsf     RESET,Ctrlbit
  574. 016B 303B           00511         movlw   0x3B                ; see if Capslock was just down
  575. 016C 0215           00512         subwf   Oldchar,W           ; 
  576. 016D 1D03           00513         btfss   STATUS,Z            ; skip if equal
  577. 016E 297D           00514         goto    transok4            ; use as Ctrl key
  578. 016F 018D           00515         clrf    Capdown             ; clear flag
  579. 0170 098C           00516         comf    Capbit,F            ; toggle down/upness of caplock
  580. 0171 303B           00517         movlw   0x3B                ; send Capslock down
  581. 0172 1C0C           00518         btfss   Capbit,0x0
  582. 0173 39FE           00519         andlw   0xFE
  583. 0174 21A0           00520         call    actualtransmit
  584.                     00521 ; send lights to AT
  585. 0175 30ED           00522         movlw   0xED                ; Next data is for lights
  586. 0176 21D7           00523         call    SendtoAT
  587. 0177 1510           00524         bsf     Lights,CapsLock     ; Capslock on
  588. 0178 1C0C           00525         btfss   Capbit,0x0
  589. 0179 1110           00526         bcf     Lights,CapsLock     ; Capslock off
  590. 017A 0810           00527         movf    Lights,W
  591. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 11
  592.  
  593.  
  594. LOC  OBJECT CODE     LINE SOURCE TEXT
  595.   VALUE
  596.  
  597. 017B 21D7           00528         call    SendtoAT
  598. 017C 0008           00529         return
  599. 017D                00530 transok4
  600. 017D 1820           00531         btfsc   win95,0x0
  601. 017E 0008           00532         return
  602. 017F 018E           00533         clrf    CtrlDown
  603. 0180 018D           00534         clrf    Capdown             ; Capslock has finished acting as ctrl
  604. 0181 3038           00535         movlw   0x38                ; send Ctrl up
  605. 0182 21A0           00536         call    actualtransmit
  606. 0183 0008           00537         return
  607. 0184                00538 transok3
  608. 0184 0816           00539         movf    Amigachar,W
  609. 0185 00A1           00540         movwf   Savechar2
  610. 0186 0095           00541         movwf   Oldchar
  611. 0187 088D           00542         movf    Capdown,F           ; Capslock down?
  612. 0188 1903           00543         btfsc   STATUS,Z            ; skip if non-zero i.e caps pressed
  613. 0189 2995           00544         goto    nocontrol           ; ignore it
  614. 018A 1820           00545         btfsc   win95,0x0
  615. 018B 2995           00546         goto    nocontrol           ; ignore it
  616. 018C 088E           00547         movf    CtrlDown,F
  617. 018D 1D03           00548         btfss   STATUS,Z            ; skip if zero i.e caps pressed
  618. 018E 2995           00549         goto    nocontrol           ; ignore it
  619. 018F 30FF           00550         movlw   0xFF
  620. 0190 008E           00551         movwf   CtrlDown            ; Caps lock is now Ctrl key
  621. 0191 3039           00552         movlw   0x39                ; send Ctrl down
  622. 0192 21A0           00553         call    actualtransmit
  623. 0193 0821           00554         movf    Savechar2,W
  624. 0194 29A0           00555         goto    actualtransmit
  625. 0195                00556 nocontrol
  626. 0195 0816           00557         movf    Amigachar,W
  627. 0196 39FE           00558         andlw   0xFE
  628. 0197 3C44           00559         sublw   0x44                ; * (Numkey) released
  629. 0198 1D03           00560         btfss   STATUS,Z            ; skip if equal
  630. 0199 019B           00561         clrf    AltConfig
  631. 019A 0A9B           00562         incf    AltConfig,F
  632.                     00563 
  633. 019B 3028           00564         movlw   0x28                ; 20 th time?
  634. 019C 021B           00565         subwf   AltConfig,W
  635. 019D 1903           00566         btfsc   STATUS,Z            ; skip if not equal
  636. 019E 22F9           00567         call    config
  637.                     00568 
  638.                     00569 
  639. 019F 0816           00570         movf    Amigachar,W
  640.                     00571 
  641. 01A0                00572 actualtransmit
  642. 01A0 0096           00573         movwf   Amigachar
  643.                     00574 
  644. 01A1 3005           00575         movlw   .5           ; do a 5x256 delay
  645. 01A2 213E           00576         call    longdelay
  646. 01A3                00577 actual2
  647. 01A3 3008           00578         movlw   .8
  648. 01A4 0097           00579         movwf   Count1
  649. 01A5 0194           00580         clrf    Charbad
  650. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 12
  651.  
  652.  
  653. LOC  OBJECT CODE     LINE SOURCE TEXT
  654.   VALUE
  655.  
  656. 01A6                00581 f
  657. 01A6 1B96           00582         btfsc   Amigachar,0x7       ; IF bit7=1 THEN Adat=1
  658. 01A7 1585           00583         bsf     PORTA,Adat
  659. 01A8 1F96           00584         btfss   Amigachar,0x7       ; IF bit7=0 THEN Adat=0
  660. 01A9 1185           00585         bcf     PORTA,Adat
  661. 01AA 3008           00586         movlw   .8
  662. 01AB 2144           00587         call    smalldelay          ; Allow Adat logic to settle
  663. 01AC 1205           00588         bcf     PORTA,Aclk          ; transmit
  664. 01AD 3008           00589         movlw   .8
  665. 01AE 2144           00590         call    smalldelay          ; Allow Aclk logic to settle
  666. 01AF 1605           00591         bsf     PORTA,Aclk          ; reset Aclk=1
  667. 01B0 300A           00592         movlw   .10
  668. 01B1 2144           00593         call    smalldelay          ; Allow Aclk logic to settle
  669. 01B2 0D96           00594         rlf     Amigachar,F
  670. 01B3 0B97           00595         decfsz  Count1,F            ; Transmit next bit?
  671. 01B4 29A6           00596         goto    f
  672.                     00597 
  673. 01B5 300F           00598         movlw   0xF
  674. 01B6 0097           00599         movwf   Count1
  675. 01B7 30FF           00600         movlw   0xFF
  676. 01B8 0097           00601         movwf   Count1
  677. 01B9 0098           00602         movwf   Count2
  678.                     00603 
  679. 01BA 1683           00604         PAGE1          
  680. 01BB 1585           00605         bsf     TRISA,Adat          ; Read acknowledge signal
  681. 01BC 1283           00606         PAGE0          
  682. 01BD                00607 ack
  683. 01BD 0397           00608         decf    Count1,F
  684. 01BE 1903           00609         btfsc   STATUS,Z
  685. 01BF 0398           00610         decf    Count2,F
  686. 01C0 0818           00611         movf    Count2,W            ; Count2=0?
  687. 01C1 1903           00612         btfsc   STATUS,Z
  688. 01C2 29CC           00613         goto    syncup              ; no handshake
  689. 01C3 1985           00614         btfsc   PORTA,Adat         ; wait for handshake from amiga
  690. 01C4 29BD           00615         goto    ack
  691. 01C5                00616 ready
  692. 01C5 1D85           00617         btfss   PORTA,Adat          ; wait for handshake to finish
  693. 01C6 29C5           00618         goto    ready
  694.                     00619 
  695. 01C7 1585           00620         bsf     PORTA,Adat          ; reset Adat=1
  696. 01C8 1683           00621         PAGE1          
  697. 01C9 1185           00622         bcf     TRISA,Adat          ; Return to output mode
  698. 01CA 1283           00623         PAGE0          
  699. 01CB 0008           00624         return
  700. 01CC                00625 syncup
  701. 01CC 1205           00626         bcf     PORTA,Aclk          ; send another clock pulse
  702. 01CD 3008           00627         movlw   .8
  703. 01CE 2144           00628         call    smalldelay          ; Allow Aclk logic to settle
  704. 01CF 1605           00629         bsf     PORTA,Aclk          ; reset Aclk=1
  705. 01D0 30FF           00630         movlw   0xFF
  706. 01D1 0097           00631         movwf   Count1
  707. 01D2 0098           00632         movwf   Count2
  708. 01D3 0391           00633         decf    Count3,F
  709. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 13
  710.  
  711.  
  712. LOC  OBJECT CODE     LINE SOURCE TEXT
  713.   VALUE
  714.  
  715. 01D4 1903           00634         btfsc   STATUS,Z
  716. 01D5 0008           00635         return
  717. 01D6 29BD           00636         goto    ack                 ; wait for acknowledge again
  718.                     00637 
  719.                     00638 
  720.                     00639 
  721.                     00640 ; *** Send character to AT keyboard and wait for handshake ***
  722. 01D7                00641 SendtoAT
  723. 01D7 0094           00642         movwf   Charbad
  724. 01D8                00643 resend
  725. 01D8 0814           00644         movf    Charbad,W
  726. 01D9 0099           00645         movwf   ATchar
  727. 01DA 0192           00646         clrf    ATparity
  728. 01DB 1486           00647         bsf     PORTB,Kclk          ; Kclk=1 get keyboards attention
  729. 01DC 0000           00648         nop
  730. 01DD 1006           00649         bcf     PORTB,Kdat          ; Kdat=0 get keyboards attention
  731. 01DE 1683           00650         PAGE1          
  732. 01DF 1086           00651         bcf     TRISB,Kclk          ; Kclk is in output mode
  733. 01E0 0000           00652         nop
  734. 01E1 1006           00653         bcf     TRISB,Kdat          ; Kdat is in output mode
  735. 01E2 1283           00654         PAGE0          
  736. 01E3 3008           00655         movlw   .8
  737. 01E4 0097           00656         movwf   Count1
  738. 01E5 1683           00657         PAGE1          
  739. 01E6 1486           00658         bsf     TRISB,Kclk          ; Kclk is in input mode
  740. 01E7 1283           00659         PAGE0          
  741. 01E8 1886           00660 Send4   btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  742. 01E9 29E8           00661         goto    Send4
  743. 01EA 1819           00662         btfsc   ATchar,0x0          ; IF bit0=1 THEN Kdat=1
  744. 01EB 1406           00663         bsf     PORTB,Kdat
  745. 01EC 1C19           00664         btfss   ATchar,0x0          ; IF bit0=0 THEN Kdat=0
  746. 01ED 1006           00665         bcf     PORTB,Kdat
  747. 01EE 0C99           00666         rrf     ATchar,F            ; next bit
  748. 01EF 1803           00667         btfsc   STATUS,C            ; test parity of bit shifted out
  749. 01F0 0A92           00668         incf    ATparity,F
  750. 01F1 1C86           00669 Send5   btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  751. 01F2 29F1           00670         goto    Send5                
  752. 01F3 0B97           00671         decfsz  Count1,F
  753. 01F4 29E8           00672         goto    Send4
  754. 01F5 1886           00673 Send6   btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  755. 01F6 29F5           00674         goto    Send6
  756. 01F7 1812           00675         btfsc   ATparity,0x0        ; IF bit0=odd THEN Kdat=0 (odd parity)
  757. 01F8 1006           00676         bcf     PORTB,Kdat
  758. 01F9 1C12           00677         btfss   ATparity,0x0        ; IF bit0=even THEN Kdat=1 (odd parity)
  759. 01FA 1406           00678         bsf     PORTB,Kdat
  760. 01FB 1C86           00679 Send7   btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  761. 01FC 29FB           00680         goto    Send7
  762. 01FD 1886           00681 Send77  btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  763. 01FE 29FD           00682         goto    Send77
  764. 01FF 1406           00683         bsf     PORTB,Kdat          ; stop bit
  765. 0200 1C86           00684 Send78  btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  766. 0201 2A00           00685         goto    Send78
  767. 0202 1683           00686         PAGE1          
  768. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 14
  769.  
  770.  
  771. LOC  OBJECT CODE     LINE SOURCE TEXT
  772.   VALUE
  773.  
  774. 0203 1406           00687         bsf     TRISB,Kdat          ; reset Kdat back to input mode
  775. 0204 1283           00688         PAGE0          
  776. 0205 1886           00689 Send79  btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  777. 0206 2A05           00690         goto    Send79
  778. 0207 1C86           00691 Send7a  btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  779. 0208 2A07           00692         goto    Send7a
  780. 0209 3008           00693         movlw   .8
  781. 020A 2144           00694         call    smalldelay          ; Allow Kclk logic to settle
  782. 020B 1086           00695         bcf     PORTB,Kclk          ; Kclk=0 Send handshake
  783. 020C 1683           00696         PAGE1          
  784. 020D 1086           00697         bcf     TRISB,Kclk          ; Kclk is in output mode
  785. 020E 1283           00698         PAGE0          
  786. 020F 3014           00699         movlw   .20
  787. 0210 2144           00700         call    smalldelay          ; Allow keyboard chance 
  788. 0211 2217           00701         call    ATgetkey
  789. 0212 30FA           00702         movlw   0xFA                ; Was transmission ok
  790. 0213 0219           00703         subwf   ATchar,W
  791. 0214 1D03           00704         btfss   STATUS,Z            ; skip if good
  792. 0215 29D8           00705         goto    resend
  793. 0216 0008           00706         return
  794.                     00707         
  795.                     00708 
  796.                     00709 
  797.                     00710 
  798.                     00711 ; *** Waits for keyboard to send code ***
  799. 0217                00712 ATgetkey
  800. 0217 0199           00713         clrf    ATchar
  801. 0218 1486           00714         bsf     PORTB,Kclk          ; Kclk=1 Allow keyboard to talk
  802. 0219 1683           00715         PAGE1
  803. 021A 1486           00716         bsf     TRISB,Kclk          ; Kclk is in input mode
  804. 021B 1283           00717         PAGE0
  805. 021C 1886           00718 skip1st btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  806. 021D 2A1C           00719         goto    skip1st
  807. 021E 1C86           00720 skippy  btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  808. 021F 2A1E           00721         goto    skippy
  809. 0220 3008           00722         movlw   .8
  810. 0221 0097           00723         movwf   Count1
  811. 0222                00724 ATwait0
  812. 0222 1886           00725         btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  813. 0223 2A22           00726         goto    ATwait0
  814. 0224 0C99           00727         rrf     ATchar,F
  815. 0225 1806           00728         btfsc   PORTB,Kdat
  816. 0226 1799           00729         bsf     ATchar,0x7
  817. 0227 1C06           00730         btfss   PORTB,Kdat
  818. 0228 1399           00731         bcf     ATchar,0x7
  819. 0229 1C86           00732 ATwait1 btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  820. 022A 2A29           00733         goto    ATwait1
  821. 022B 0B97           00734         decfsz  Count1,F
  822. 022C 2A22           00735         goto    ATwait0             ; get all 8 bits of data
  823. 022D 1886           00736 parity0 btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  824. 022E 2A2D           00737         goto    parity0
  825. 022F 1C86           00738 parity1 btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  826. 0230 2A2F           00739         goto    parity1
  827. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 15
  828.  
  829.  
  830. LOC  OBJECT CODE     LINE SOURCE TEXT
  831.   VALUE
  832.  
  833. 0231 1886           00740 stop0   btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  834. 0232 2A31           00741         goto    stop0
  835. 0233 1C86           00742 stop1   btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  836. 0234 2A33           00743         goto    stop1
  837. 0235 1086           00744         bcf     PORTB,Kclk          ; Kclk=0 Send handshake
  838. 0236 1683           00745         PAGE1
  839. 0237 1086           00746         bcf     TRISB,Kclk          ; Kclk is in output mode
  840. 0238 1283           00747         PAGE0
  841. 0239 3014           00748         movlw   .20
  842. 023A 2144           00749         call    smalldelay          ; Allow keyboard chance to recieve
  843. 023B 0008           00750         return
  844.                     00751 
  845.                     00752 
  846.                     00753 
  847.                     00754 
  848.                     00755 
  849.                     00756 ; *** Flash Light ***
  850. 023C                00757 flash
  851. 023C 0090           00758         movwf   Lights
  852. 023D 30ED           00759                 movlw   0xED                ; Next data is for lights
  853. 023E 21D7           00760         call    SendtoAT
  854. 023F 0810           00761         movf    Lights,W            ; Flash lights
  855. 0240 21D7           00762         call    SendtoAT
  856. 0241 3025           00763         movlw   0x25
  857. 0242 213E           00764         call    longdelay     
  858. 0243 30ED           00765         movlw   0xED                ; Next data is for lights
  859. 0244 21D7           00766         call    SendtoAT
  860. 0245 3000           00767         movlw   0x0                 ; Clear Lights
  861. 0246 21D7           00768         call    SendtoAT
  862. 0247 3025           00769         movlw   0x25
  863. 0248 213E           00770         call    longdelay     
  864. 0249 0008           00771                 return
  865.                     00772 
  866.                     00773 
  867.                     00774 
  868.                     00775 ; *** Performs reset on Amiga ***
  869. 024A                00776 reset
  870. 024A 3001           00777         movlw   Resetype
  871. 024B 23D8           00778         call    readdata
  872. 024C 3C01           00779         sublw   0x1                 
  873. 024D 1903           00780         btfsc   STATUS,Z            ; skip if not equal
  874. 024E 2A5B           00781         goto    kill                ; jump if fast reset
  875. 024F 300F           00782         movlw   0x0F                ; Tell amiga we are going to reset it
  876. 0250 21A0           00783         call    actualtransmit
  877.                     00784 
  878. 0251 3008           00785                 movlw   0x8
  879. 0252 0091           00786         movwf   Count3
  880. 0253 3001           00787 strobe  movlw   0x1
  881. 0254 223C           00788                 call    flash
  882. 0255 3002           00789                 movlw   0x2
  883. 0256 223C           00790             call        flash
  884. 0257 3004           00791                 movlw   0x4
  885. 0258 223C           00792             call        flash
  886. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 16
  887.  
  888.  
  889. LOC  OBJECT CODE     LINE SOURCE TEXT
  890.   VALUE
  891.  
  892. 0259 0B91           00793         decfsz  Count3,F
  893. 025A 2A53           00794         goto    strobe
  894. 025B                00795 kill
  895. 025B 3070           00796         movlw   0x70
  896. 025C 213E           00797         call    longdelay     
  897. 025D 1106           00798         bcf     PORTB,Arst          ; Arst=0 Send reset
  898. 025E 1683           00799         PAGE1
  899. 025F 1106           00800         bcf     TRISB,Arst          ; Arst is in output mode
  900. 0260 1283           00801         PAGE0
  901. 0261 30FF           00802         movlw   0xFF
  902. 0262 213E           00803         call    longdelay           ; Wait for Amiga to reset
  903. 0263 2A6E           00804         goto    start2
  904.                     00805 
  905.                     00806 
  906.                     00807 
  907.                     00808 
  908. 0264                00809 start
  909.                     00810 
  910.                     00811 ; *** Allow time for HardDrive to spin upto speed ***
  911. 0264                00812 SpinUp
  912. 0264 1106           00813         bcf     PORTB,Arst          ; Arst=0 Send reset
  913. 0265 1683           00814         PAGE1
  914. 0266 1106           00815         bcf     TRISB,Arst          ; Arst is in output mode
  915. 0267 1283           00816         PAGE0
  916. 0268 3030           00817         movlw   0x30
  917. 0269 0091           00818         movwf   Count3
  918. 026A                00819 waitHD
  919. 026A 30FF           00820         movlw   0xFF
  920. 026B 213E           00821         call    longdelay           ; Wait for drive to wake up
  921. 026C 0B91           00822         decfsz  Count3,F
  922. 026D 2A6A           00823         goto    waitHD
  923.                     00824 
  924. 026E                00825 start2
  925.                     00826 ; *** Setup ports ***
  926. 026E 1605           00827         bsf     PORTA,Aclk          ; transmit
  927. 026F 0000           00828         nop
  928. 0270 1585           00829         bsf     PORTA,Adat
  929. 0271 1683           00830         PAGE1          
  930. 0272 3007           00831         movlw   0x7
  931. 0273 0085           00832         movwf   TRISA
  932. 0274 30FF           00833         movlw   0xFF
  933. 0275 0086           00834         movwf   TRISB
  934. 0276 1283           00835         PAGE0          
  935.                     00836 
  936.                     00837 
  937.                     00838 ; *** Clear out miscellaneous flags ***
  938. 0277 018D           00839         clrf    Capdown
  939. 0278 018E           00840         clrf    CtrlDown
  940. 0279 018C           00841         clrf    Capbit
  941. 027A 0195           00842         clrf    Oldchar
  942. 027B 019B           00843         clrf    AltConfig
  943. 027C 3007           00844         movlw   0x7
  944. 027D 008F           00845         movwf   RESET
  945. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 17
  946.  
  947.  
  948. LOC  OBJECT CODE     LINE SOURCE TEXT
  949.   VALUE
  950.  
  951.                     00846 
  952.                     00847 ; *** See what sort of keyboard is attached ***
  953. 027E 01A0           00848         clrf    win95
  954. 027F 3000           00849         movlw   Keytype
  955. 0280 23D8           00850         call    readdata
  956. 0281 3C02           00851         sublw   0x2                 
  957. 0282 1903           00852         btfsc   STATUS,Z            ; skip if not equal
  958. 0283 09A0           00853         comf    win95               ; win95=true or false
  959.                     00854 
  960.                     00855 ; *** Wait for AT keyboard to power up ***
  961. 0284                00856 waitAT
  962. 0284 1C06           00857         btfss   PORTB,Kdat         ; wait for AT keyboard
  963. 0285 2A84           00858         goto    waitAT
  964.                     00859         
  965.                     00860 ; *** Reset AT keyboard ***
  966.                     00861 ;        movlw   0xFF            ; Reset
  967.                     00862 ;        call    SendtoAT
  968. 0286 30F6           00863         movlw   0xF6            ; Default
  969. 0287 21D7           00864         call    SendtoAT
  970. 0288 3007           00865                 movlw   0x7
  971. 0289 223C           00866                 call    flash
  972. 028A 30ED           00867         movlw   0xED            ; Next data is for lights
  973. 028B 21D7           00868         call    SendtoAT
  974. 028C 3002           00869         movlw   0x2
  975. 028D 0090           00870         movwf   Lights
  976. 028E 21D7           00871         call    SendtoAT
  977. 028F 30F4           00872         movlw   0xF4            ; Clear buffer
  978. 0290 21D7           00873         call    SendtoAT
  979.                     00874 
  980.                     00875 
  981. 0291                00876 ATstyle
  982. 0291 088F           00877         movf    RESET,F
  983. 0292 1903           00878         btfsc   STATUS,Z
  984. 0293 2A4A           00879         goto    reset
  985. 0294 2217           00880         call    ATgetkey
  986. 0295 30E1           00881         movlw   0xE1
  987. 0296 0219           00882         subwf   ATchar,W
  988. 0297 1D03           00883         btfss   STATUS,Z            ; skip if equal
  989. 0298 2AA1           00884         goto    ATnE1        
  990. 0299 2217           00885         call    ATgetkey            ; should be $14
  991. 029A 2217           00886         call    ATgetkey            ; should be $77
  992. 029B 2217           00887         call    ATgetkey            ; should be $E1
  993. 029C 2217           00888         call    ATgetkey            ; should be $F0
  994. 029D 2217           00889         call    ATgetkey            ; should be $14
  995. 029E 2217           00890         call    ATgetkey            ; should be $F0
  996. 029F 2217           00891         call    ATgetkey            ; should be $77
  997. 02A0 2A91           00892         goto    ATstyle
  998. 02A1                00893 ATnE1
  999. 02A1 019A           00894         clrf    tableoffset
  1000. 02A2 30E0           00895         movlw   0xE0
  1001. 02A3 0219           00896         subwf   ATchar,W
  1002. 02A4 1D03           00897         btfss   STATUS,Z            ; skip if equal
  1003. 02A5 2AC0           00898         goto    ATnE0        
  1004. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 18
  1005.  
  1006.  
  1007. LOC  OBJECT CODE     LINE SOURCE TEXT
  1008.   VALUE
  1009.  
  1010. 02A6 3080           00899         movlw   0x80
  1011. 02A7 009A           00900         movwf   tableoffset
  1012. 02A8 2217           00901         call    ATgetkey
  1013. 02A9 30F0           00902         movlw   0xF0
  1014. 02AA 0219           00903         subwf   ATchar,W
  1015. 02AB 1D03           00904         btfss   STATUS,Z            ; skip if equal
  1016. 02AC 2AB7           00905         goto    ATnE0F0        
  1017. 02AD 2217           00906         call    ATgetkey
  1018. 02AE 3012           00907         movlw   0x12
  1019. 02AF 0219           00908         subwf   ATchar,W
  1020. 02B0 1903           00909         btfsc   STATUS,Z            ; skip if not equal
  1021. 02B1 2A91           00910         goto    ATstyle             ; E0F012 ignore it
  1022. 02B2                00911 ATnEF12
  1023. 02B2 3059           00912         movlw   0x59
  1024. 02B3 0219           00913         subwf   ATchar,W
  1025. 02B4 1D03           00914         btfss   STATUS,Z            ; skip if equal
  1026. 02B5 2ACD           00915         goto    ATup        
  1027. 02B6 2A91           00916         goto    ATstyle             ; E0F059 ignore it
  1028. 02B7                00917 ATnE0F0
  1029. 02B7 3012           00918         movlw   0x12
  1030. 02B8 0219           00919         subwf   ATchar,W
  1031. 02B9 1903           00920         btfsc   STATUS,Z            ; skip if not equal
  1032. 02BA 2A91           00921         goto    ATstyle             ; E012 ignore it
  1033. 02BB                00922 ATnE012
  1034. 02BB 3059           00923         movlw   0x59
  1035. 02BC 0219           00924         subwf   ATchar,W
  1036. 02BD 1D03           00925         btfss   STATUS,Z            ; skip if equal
  1037. 02BE 2AC6           00926         goto    ATdown        
  1038. 02BF 2A91           00927         goto    ATstyle             ; E059 ignore it
  1039. 02C0                00928 ATnE0
  1040. 02C0 30F0           00929         movlw   0xF0
  1041. 02C1 0219           00930         subwf   ATchar,W
  1042. 02C2 1D03           00931         btfss   STATUS,Z            ; skip if equal
  1043. 02C3 2AC6           00932         goto    ATdown        
  1044. 02C4 2217           00933         call    ATgetkey
  1045. 02C5 2ACD           00934         goto    ATup                ; F0= key released
  1046. 02C6                00935 ATdown        
  1047. 02C6 0A19           00936         incf    ATchar,W
  1048. 02C7 071A           00937         addwf   tableoffset,W
  1049. 02C8 2001           00938         call    ATtb1
  1050. 02C9 3E00           00939         addlw   0x0                 ; test W
  1051. 02CA 1D03           00940         btfss   STATUS,Z
  1052. 02CB 2148           00941         call    amigatransmit
  1053. 02CC 2A91           00942         goto    ATstyle
  1054. 02CD                00943 ATup        
  1055. 02CD 0A19           00944         incf    ATchar,W
  1056. 02CE 071A           00945         addwf   tableoffset,W
  1057. 02CF 009A           00946         movwf   tableoffset
  1058.                     00947 
  1059. 02D0 30B0           00948         movlw   0xAF+1              ; menu key
  1060. 02D1 021A           00949         subwf   tableoffset,W
  1061. 02D2 1903           00950         btfsc   STATUS,Z            ; skip if not equal
  1062. 02D3 2A91           00951         goto    ATstyle             ; ignore it
  1063. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 19
  1064.  
  1065.  
  1066. LOC  OBJECT CODE     LINE SOURCE TEXT
  1067.   VALUE
  1068.  
  1069.                     00952 
  1070. 02D4 3085           00953         movlw   0x84+1              ; PrtScrn
  1071. 02D5 021A           00954         subwf   tableoffset,W
  1072. 02D6 1903           00955         btfsc   STATUS,Z            ; skip if not equal
  1073. 02D7 2A91           00956         goto    ATstyle             ; ignore it
  1074.                     00957 
  1075. 02D8 30EA           00958         movlw   0xE9+1              ; End
  1076. 02D9 021A           00959         subwf   tableoffset,W
  1077. 02DA 1903           00960         btfsc   STATUS,Z            ; skip if not equal
  1078. 02DB 2A91           00961         goto    ATstyle             ; ignore it
  1079.                     00962 
  1080. 02DC 30ED           00963         movlw   0xEC+1              ; Home
  1081. 02DD 021A           00964         subwf   tableoffset,W
  1082. 02DE 1903           00965         btfsc   STATUS,Z            ; skip if not equal
  1083. 02DF 2A91           00966         goto    ATstyle             ; ignore it
  1084.                     00967 
  1085. 02E0 30F1           00968         movlw   0xF0+1              ; Insert
  1086. 02E1 021A           00969         subwf   tableoffset,W
  1087. 02E2 1903           00970         btfsc   STATUS,Z            ; skip if not equal
  1088. 02E3 2A91           00971         goto    ATstyle             ; ignore it
  1089.                     00972 
  1090. 02E4 30FB           00973         movlw   0xFA+1              ; PageDown
  1091. 02E5 021A           00974         subwf   tableoffset,W
  1092. 02E6 1903           00975         btfsc   STATUS,Z            ; skip if not equal
  1093. 02E7 2A91           00976         goto    ATstyle             ; ignore it
  1094.                     00977 
  1095. 02E8 30FD           00978         movlw   0xFC+1              ; PrtScrn
  1096. 02E9 021A           00979         subwf   tableoffset,W
  1097. 02EA 1903           00980         btfsc   STATUS,Z            ; skip if not equal
  1098. 02EB 2A91           00981         goto    ATstyle             ; ignore it
  1099.                     00982 
  1100. 02EC 30FE           00983         movlw   0xFD+1              ; PageUp
  1101. 02ED 021A           00984         subwf   tableoffset,W
  1102. 02EE 1903           00985         btfsc   STATUS,Z            ; skip if not equal
  1103. 02EF 2A91           00986         goto    ATstyle             ; ignore it
  1104.                     00987 
  1105. 02F0 30FF           00988         movlw   0xFE+1              ; Break
  1106. 02F1 021A           00989         subwf   tableoffset,W
  1107. 02F2 1903           00990         btfsc   STATUS,Z            ; skip if not equal
  1108. 02F3 2A91           00991         goto    ATstyle             ; ignore it
  1109.                     00992 
  1110. 02F4 081A           00993         movf    tableoffset,W
  1111. 02F5 2001           00994         call    ATtb1
  1112. 02F6 39FE           00995         andlw   0xFE                ; clear bit 0
  1113. 02F7 2148           00996         call    amigatransmit
  1114. 02F8 2A91           00997         goto    ATstyle
  1115.                     00998         
  1116.                     00999 
  1117.                     01000 
  1118.                     01001 
  1119.                     01002 
  1120.                     01003 
  1121.                     01004 
  1122. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 20
  1123.  
  1124.  
  1125. LOC  OBJECT CODE     LINE SOURCE TEXT
  1126.   VALUE
  1127.  
  1128.                     01005 
  1129.                     01006 
  1130.                     01007 
  1131.                     01008 
  1132.                     01009 
  1133.                     01010 
  1134.                     01011 
  1135.                     01012 ; *** Change configuration ***
  1136. 02F9                01013 config
  1137. 02F9 019E           01014         clrf    eeaddress
  1138. 02FA 303B           01015         movlw   0x3B                ; CAPSLOCK ON
  1139. 02FB 21A0           01016         call    actualtransmit
  1140.                     01017         
  1141. 02FC 235C           01018         call    say_select          ; Select Type of
  1142. 02FD 237E           01019         call    say_key             ; key
  1143. 02FE 3095           01020         movlw   0x95                ; b
  1144. 02FF 23B5           01021         call    sendmessage
  1145. 0300 30CF           01022         movlw   0xCF                ; o
  1146. 0301 23B5           01023         call    sendmessage
  1147. 0302 30BF           01024         movlw   0xBF                ; a
  1148. 0303 23B5           01025         call    sendmessage
  1149. 0304 30D9           01026         movlw   0xD9                ; r
  1150. 0305 23B5           01027         call    sendmessage
  1151. 0306 30BB           01028         movlw   0xBB                ; d
  1152. 0307 23B5           01029         call    sendmessage
  1153. 0308 2385           01030         call    say_option1         ; 1=
  1154. 0309 2398           01031         call    say_uk10            ; uk 10
  1155. 030A 30FB           01032         movlw   0xFB                ; 2
  1156. 030B 23B5           01033         call    sendmessage
  1157. 030C 307F           01034         movlw   0x7F                ; space
  1158. 030D 23B5           01035         call    sendmessage
  1159. 030E 237E           01036         call    say_key             ; key
  1160. 030F 238F           01037         call    say_option2         ; 2=
  1161. 0310 2398           01038         call    say_uk10            ; uk 10
  1162. 0311 30F5           01039         movlw   0xF5                ; 5
  1163. 0312 23B5           01040         call    sendmessage
  1164. 0313 307F           01041         movlw   0x7F                ; space
  1165. 0314 23B5           01042         call    sendmessage
  1166. 0315 237E           01043         call    say_key             ; key
  1167. 0316 307F           01044         movlw   0x7F                ; space
  1168. 0317 23B5           01045         call    sendmessage
  1169. 0318 30DD           01046         movlw   0xDD                ; w
  1170. 0319 23B5           01047         call    sendmessage
  1171. 031A 30D1           01048         movlw   0xD1                ; i
  1172. 031B 23B5           01049         call    sendmessage
  1173. 031C 3093           01050         movlw   0x93                ; n
  1174. 031D 23B5           01051         call    sendmessage
  1175. 031E 30ED           01052         movlw   0xED                ; 9
  1176. 031F 23B5           01053         call    sendmessage
  1177. 0320 30F5           01054         movlw   0xF5                ; 5
  1178. 0321 23B5           01055         call    sendmessage
  1179. 0322 3077           01056         movlw   0x77                ; return 
  1180. 0323 23B5           01057         call    sendmessage
  1181. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 21
  1182.  
  1183.  
  1184. LOC  OBJECT CODE     LINE SOURCE TEXT
  1185.   VALUE
  1186.  
  1187. 0324 23BC           01058         call    getselection
  1188. 0325 009F           01059         movwf   eedata
  1189. 0326 081F           01060         movf    eedata,W
  1190. 0327 1903           01061         btfsc   STATUS,Z            ; skip if not zero
  1191. 0328 2AF9           01062         goto    config              ; bad choice, try again
  1192. 0329 23C8           01063         call    writedata        
  1193. 032A 23A3           01064         call    say_ok
  1194. 032B 01A0           01065         clrf    win95
  1195. 032C 3000           01066         movlw   Keytype
  1196. 032D 23D8           01067         call    readdata
  1197. 032E 3C02           01068         sublw   0x2                 
  1198. 032F 1903           01069         btfsc   STATUS,Z            ; skip if not equal
  1199. 0330 09A0           01070         comf    win95               ; win95=true or false
  1200.                     01071 
  1201. 0331 0A9E           01072         incf    eeaddress
  1202. 0332                01073 askreset
  1203. 0332 235C           01074         call    say_select          ; Select Type of
  1204. 0333 23AA           01075         call    say_reset           ; reset
  1205. 0334 2385           01076         call    say_option1         ; 1=
  1206. 0335 30B9           01077         movlw   0xB9                ; f
  1207. 0336 23B5           01078         call    sendmessage
  1208. 0337 30BF           01079         movlw   0xBF                ; a
  1209. 0338 23B5           01080         call    sendmessage
  1210. 0339 30BD           01081         movlw   0xBD                ; s
  1211. 033A 23B5           01082         call    sendmessage
  1212. 033B 30D7           01083         movlw   0xD7                ; t
  1213. 033C 23B5           01084         call    sendmessage
  1214. 033D 307F           01085         movlw   0x7F                ; space
  1215. 033E 23B5           01086         call    sendmessage
  1216. 033F 23AA           01087         call    say_reset           ; reset
  1217. 0340 238F           01088         call    say_option2         ; 2=
  1218. 0341 30BD           01089         movlw   0xBD                ; s
  1219. 0342 23B5           01090         call    sendmessage
  1220. 0343 30AF           01091         movlw   0xAF                ; l
  1221. 0344 23B5           01092         call    sendmessage
  1222. 0345 30CF           01093         movlw   0xCF                ; o
  1223. 0346 23B5           01094         call    sendmessage
  1224. 0347 30DD           01095         movlw   0xDD                ; w
  1225. 0348 23B5           01096         call    sendmessage
  1226. 0349 307F           01097         movlw   0x7F                ; space
  1227. 034A 23B5           01098         call    sendmessage
  1228. 034B 23AA           01099         call    say_reset           ; reset
  1229. 034C 3077           01100         movlw   0x77                ; return 
  1230. 034D 23B5           01101         call    sendmessage
  1231.                     01102 
  1232. 034E 23BC           01103         call    getselection
  1233. 034F 009F           01104         movwf   eedata
  1234. 0350 081F           01105         movf    eedata,W
  1235. 0351 1903           01106         btfsc   STATUS,Z            ; skip if not zero
  1236. 0352 2B32           01107         goto    askreset            ; bad choice, try again
  1237. 0353 23C8           01108         call    writedata        
  1238. 0354 23A3           01109         call    say_ok
  1239.                     01110 
  1240. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 22
  1241.  
  1242.  
  1243. LOC  OBJECT CODE     LINE SOURCE TEXT
  1244.   VALUE
  1245.  
  1246. 0355 019B           01111         clrf    AltConfig
  1247. 0356 307E           01112         movlw   0x7E                ; space up
  1248. 0357 088D           01113         movf    Capdown,F           ; Capslock down?
  1249. 0358 1903           01114         btfsc   STATUS,Z            ; skip if non-zero i.e caps pressed
  1250. 0359 303A           01115         movlw   0x3A                ; Caps up
  1251. 035A 0096           01116         movwf   Amigachar
  1252. 035B 0008           01117         return
  1253.                     01118         
  1254. 035C                01119 say_select
  1255. 035C 3077           01120         movlw   0x77                ; return x2
  1256. 035D 23B5           01121         call    sendmessage
  1257. 035E 23B5           01122         call    sendmessage
  1258. 035F 30BD           01123         movlw   0xBD                ; s
  1259. 0360 23B5           01124         call    sendmessage
  1260. 0361 30DB           01125         movlw   0xDB                ; e
  1261. 0362 23B5           01126         call    sendmessage
  1262. 0363 30AF           01127         movlw   0xAF                ; l
  1263. 0364 23B5           01128         call    sendmessage
  1264. 0365 30DB           01129         movlw   0xDB                ; e
  1265. 0366 23B5           01130         call    sendmessage
  1266. 0367 3099           01131         movlw   0x99                ; c
  1267. 0368 23B5           01132         call    sendmessage
  1268. 0369 30D7           01133         movlw   0xD7                ; t
  1269. 036A 23B5           01134         call    sendmessage
  1270. 036B 307F           01135         movlw   0x7F                ; space
  1271. 036C 23B5           01136         call    sendmessage
  1272. 036D 30D7           01137         movlw   0xD7                ; t
  1273. 036E 23B5           01138         call    sendmessage
  1274. 036F 30D5           01139         movlw   0xD5                ; y
  1275. 0370 23B5           01140         call    sendmessage
  1276. 0371 30CD           01141         movlw   0xCD                ; p
  1277. 0372 23B5           01142         call    sendmessage
  1278. 0373 30DB           01143         movlw   0xDB                ; e
  1279. 0374 23B5           01144         call    sendmessage
  1280. 0375 307F           01145         movlw   0x7F                ; space
  1281. 0376 23B5           01146         call    sendmessage
  1282. 0377 30CF           01147         movlw   0xCF                ; o
  1283. 0378 23B5           01148         call    sendmessage
  1284. 0379 30B9           01149         movlw   0xB9                ; f
  1285. 037A 23B5           01150         call    sendmessage
  1286. 037B 307F           01151         movlw   0x7F                ; space
  1287. 037C 23B5           01152         call    sendmessage
  1288. 037D 0008           01153         return
  1289.                     01154 
  1290. 037E                01155 say_key
  1291. 037E 30B1           01156         movlw   0xB1                ; k
  1292. 037F 23B5           01157         call    sendmessage
  1293. 0380 30DB           01158         movlw   0xDB                ; e
  1294. 0381 23B5           01159         call    sendmessage
  1295. 0382 30D5           01160         movlw   0xD5                ; y
  1296. 0383 23B5           01161         call    sendmessage
  1297. 0384 0008           01162         return
  1298.                     01163 
  1299. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 23
  1300.  
  1301.  
  1302. LOC  OBJECT CODE     LINE SOURCE TEXT
  1303.   VALUE
  1304.  
  1305. 0385                01164 say_option1
  1306. 0385 3077           01165        movlw   0x77                ; return x2
  1307. 0386 23B5           01166         call    sendmessage
  1308. 0387 23B5           01167         call    sendmessage
  1309. 0388 30FD           01168         movlw   0xFD                ; 1
  1310. 0389 23B5           01169         call    sendmessage
  1311. 038A 30E7           01170         movlw   0xE7                ; =
  1312. 038B 23B5           01171         call    sendmessage
  1313. 038C 307F           01172         movlw   0x7F                ; space
  1314. 038D 23B5           01173         call    sendmessage
  1315. 038E 0008           01174         return
  1316.                     01175 
  1317. 038F                01176 say_option2
  1318. 038F 3077           01177         movlw   0x77                ; return 
  1319. 0390 23B5           01178         call    sendmessage
  1320. 0391 30FB           01179         movlw   0xFB                ; 2
  1321. 0392 23B5           01180         call    sendmessage
  1322. 0393 30E7           01181         movlw   0xE7                ; =
  1323. 0394 23B5           01182         call    sendmessage
  1324. 0395 307F           01183         movlw   0x7F                ; space
  1325. 0396 23B5           01184         call    sendmessage
  1326. 0397 0008           01185         return
  1327.                     01186 
  1328. 0398                01187 say_uk10
  1329. 0398 30D3           01188         movlw   0xD3                ; u
  1330. 0399 23B5           01189         call    sendmessage
  1331. 039A 30B1           01190         movlw   0xB1                ; k
  1332. 039B 23B5           01191         call    sendmessage
  1333. 039C 307F           01192         movlw   0x7F                ; space
  1334. 039D 23B5           01193         call    sendmessage
  1335. 039E 30FD           01194         movlw   0xFD                ; 1
  1336. 039F 23B5           01195         call    sendmessage
  1337. 03A0 30EB           01196         movlw   0xEB                ; 0
  1338. 03A1 23B5           01197         call    sendmessage
  1339. 03A2 0008           01198         return
  1340.                     01199 
  1341. 03A3                01200 say_ok
  1342. 03A3 30CF           01201         movlw   0xCF                ; o
  1343. 03A4 23B5           01202         call    sendmessage
  1344. 03A5 30B1           01203         movlw   0xB1                ; k
  1345. 03A6 23B5           01204         call    sendmessage
  1346. 03A7 3077           01205         movlw   0x77                ; return
  1347. 03A8 23B5           01206         call    sendmessage
  1348. 03A9 0008           01207         return
  1349.                     01208 
  1350. 03AA                01209 say_reset
  1351. 03AA 30D9           01210         movlw   0xD9                ; r
  1352. 03AB 23B5           01211         call    sendmessage
  1353. 03AC 30DB           01212         movlw   0xDB                ; e
  1354. 03AD 23B5           01213         call    sendmessage
  1355. 03AE 30BD           01214         movlw   0xBD                ; s
  1356. 03AF 23B5           01215         call    sendmessage
  1357. 03B0 30DB           01216         movlw   0xDB                ; e
  1358. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 24
  1359.  
  1360.  
  1361. LOC  OBJECT CODE     LINE SOURCE TEXT
  1362.   VALUE
  1363.  
  1364. 03B1 23B5           01217         call    sendmessage
  1365. 03B2 30D7           01218         movlw   0xD7                ; t
  1366. 03B3 23B5           01219         call    sendmessage
  1367. 03B4 0008           01220         return
  1368.                     01221 
  1369.                     01222 
  1370. 03B5                01223 sendmessage
  1371. 03B5 009C           01224         movwf   Savechar
  1372. 03B6 21A0           01225         call    actualtransmit
  1373. 03B7 081C           01226         movf    Savechar,W
  1374. 03B8 39FE           01227         andlw   0xFE
  1375. 03B9 21A0           01228         call    actualtransmit
  1376. 03BA 081C           01229         movf    Savechar,W
  1377. 03BB 0008           01230         return        
  1378.                     01231 
  1379. 03BC                01232 getselection
  1380. 03BC 2217           01233         call    ATgetkey
  1381. 03BD 2217           01234         call    ATgetkey
  1382. 03BE 2217           01235         call    ATgetkey
  1383. 03BF 3016           01236         movlw   0x16                ; was key 1 pressed and released
  1384. 03C0 0219           01237         subwf   ATchar,W
  1385. 03C1 1903           01238         btfsc   STATUS,Z            ; skip if not equal
  1386. 03C2 3401           01239         retlw   0x1     
  1387. 03C3 301E           01240         movlw   0x1E                ; was key 2 pressed and released
  1388. 03C4 0219           01241         subwf   ATchar,W
  1389. 03C5 1903           01242         btfsc   STATUS,Z            ; skip if not equal
  1390. 03C6 3402           01243         retlw   0x2        
  1391. 03C7 3400           01244         retlw   0x0
  1392.                     01245 
  1393. 03C8                01246 writedata
  1394. 03C8 081E           01247         movf    eeaddress,W
  1395. 03C9 0089           01248         movwf   EEADR
  1396. 03CA 081F           01249         movf    eedata,W
  1397. 03CB 0088           01250         movwf   EEDATA
  1398. 03CC 1683           01251         PAGE1
  1399. 03CD 1508           01252         bsf     EECON1,WREN         ; EEPROM write enable
  1400. 03CE 3055           01253         movlw   0x55
  1401. 03CF 0089           01254         movwf   EECON2
  1402. 03D0 30AA           01255         movlw   0xAA
  1403. 03D1 0089           01256         movwf   EECON2
  1404. 03D2 1488           01257         bsf     EECON1,WR
  1405. 03D3                01258 wait_write
  1406. 03D3 1E08           01259         btfss   EECON1,EEIF         ; wait for write to finish
  1407. 03D4 2BD3           01260         goto    wait_write
  1408. 03D5 0188           01261         clrf    EECON1              ; EEPROM write disable & int accept
  1409. 03D6 1283           01262         PAGE0
  1410. 03D7 0008           01263         return
  1411.                     01264 
  1412.                     01265 
  1413. 03D8                01266 readdata
  1414. 03D8 0089           01267         movwf   EEADR
  1415. 03D9 1683           01268         PAGE1
  1416. 03DA 1408           01269         bsf     EECON1,RD           ; EEPROM read
  1417. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 25
  1418.  
  1419.  
  1420. LOC  OBJECT CODE     LINE SOURCE TEXT
  1421.   VALUE
  1422.  
  1423. 03DB 1283           01270         PAGE0
  1424. 03DC 0808           01271         movf    EEDATA,W
  1425. 03DD 0008           01272         return
  1426.                     01273 
  1427.                     01274 
  1428.                     01275 
  1429.                     01276 
  1430.                     01277 
  1431.                     01278 
  1432.                     01279 
  1433.                     01280         end
  1434. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 26
  1435.  
  1436.  
  1437. SYMBOL TABLE
  1438.   LABEL                             VALUE 
  1439.  
  1440. ATchar                            00000019
  1441. ATdown                            000002C6
  1442. ATgetkey                          00000217
  1443. ATnE0                             000002C0
  1444. ATnE012                           000002BB
  1445. ATnE0F0                           000002B7
  1446. ATnE1                             000002A1
  1447. ATnEF12                           000002B2
  1448. ATparity                          00000012
  1449. ATstyle                           00000291
  1450. ATtb1                             00000001
  1451. ATtb2                             00000081
  1452. ATup                              000002CD
  1453. ATwait0                           00000222
  1454. ATwait1                           00000229
  1455. Aclk                              00000004
  1456. Adat                              00000003
  1457. AltConfig                         0000001B
  1458. Amigachar                         00000016
  1459. Arst                              00000002
  1460. C                                 00000000
  1461. Capbit                            0000000C
  1462. Capdown                           0000000D
  1463. CapsLock                          00000002
  1464. Charbad                           00000014
  1465. Count1                            00000017
  1466. Count2                            00000018
  1467. Count3                            00000011
  1468. CtrlDown                          0000000E
  1469. Ctrlbit                           00000000
  1470. DC                                00000001
  1471. EEADR                             00000009
  1472. EECON1                            00000088
  1473. EECON2                            00000089
  1474. EEDATA                            00000008
  1475. EEIE                              00000006
  1476. EEIF                              00000004
  1477. F                                 00000001
  1478. FSR                               00000004
  1479. GIE                               00000007
  1480. INDF                              00000000
  1481. INTCON                            0000000B
  1482. INTE                              00000004
  1483. INTEDG                            00000006
  1484. INTF                              00000001
  1485. IRP                               00000007
  1486. Kclk                              00000001
  1487. Kdat                              00000000
  1488. Keytype                           00000000
  1489. LAmigabit                         00000002
  1490. Lights                            00000010
  1491. Make                              00000013
  1492. NOT_PD                            00000003
  1493. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 27
  1494.  
  1495.  
  1496. SYMBOL TABLE
  1497.   LABEL                             VALUE 
  1498.  
  1499. NOT_RBPU                          00000007
  1500. NOT_TO                            00000004
  1501. NumLock                           00000001
  1502. OPTION_REG                        00000081
  1503. Oldchar                           00000015
  1504. PAGE0                             bcf     STATUS,RP0
  1505. PAGE1                             bsf     STATUS,RP0
  1506. PCL                               00000002
  1507. PCLATH                            0000000A
  1508. PORTA                             00000005
  1509. PORTB                             00000006
  1510. PS0                               00000000
  1511. PS1                               00000001
  1512. PS2                               00000002
  1513. PSA                               00000003
  1514. RAmigabit                         00000001
  1515. RBIE                              00000003
  1516. RBIF                              00000000
  1517. RD                                00000000
  1518. RESET                             0000000F
  1519. RP0                               00000005
  1520. RP1                               00000006
  1521. Resetype                          00000001
  1522. STATUS                            00000003
  1523. Savechar                          0000001C
  1524. Savechar2                         00000021
  1525. ScratchPadRam                     0000000C
  1526. ScrollLock                        00000000
  1527. Send4                             000001E8
  1528. Send5                             000001F1
  1529. Send6                             000001F5
  1530. Send7                             000001FB
  1531. Send77                            000001FD
  1532. Send78                            00000200
  1533. Send79                            00000205
  1534. Send7a                            00000207
  1535. SendtoAT                          000001D7
  1536. SpinUp                            00000264
  1537. T0CS                              00000005
  1538. T0IE                              00000005
  1539. T0IF                              00000002
  1540. T0SE                              00000004
  1541. TMR0                              00000001
  1542. TRISA                             00000085
  1543. TRISB                             00000086
  1544. W                                 00000000
  1545. WR                                00000001
  1546. WREN                              00000002
  1547. WRERR                             00000003
  1548. Z                                 00000002
  1549. _CP_OFF                           00003FFF
  1550. _CP_ON                            00003FEF
  1551. _HS_OSC                           00003FFE
  1552. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 28
  1553.  
  1554.  
  1555. SYMBOL TABLE
  1556.   LABEL                             VALUE 
  1557.  
  1558. _LP_OSC                           00003FFC
  1559. _PWRTE_OFF                        00003FF7
  1560. _PWRTE_ON                         00003FFF
  1561. _RC_OSC                           00003FFF
  1562. _WDT_OFF                          00003FFB
  1563. _WDT_ON                           00003FFF
  1564. _XT_OSC                           00003FFD
  1565. __16C84                           00000001
  1566. ack                               000001BD
  1567. actual2                           000001A3
  1568. actualtransmit                    000001A0
  1569. amigatransmit                     00000148
  1570. askreset                          00000332
  1571. break                             00000137
  1572. config                            000002F9
  1573. delay                             00000145
  1574. dly                               0000013F
  1575. eeaddress                         0000001E
  1576. eedata                            0000001F
  1577. endkey                            00000114
  1578. f                                 000001A6
  1579. fixeddelay                        00000143
  1580. flash                             0000023C
  1581. getselection                      000003BC
  1582. home                              0000011B
  1583. insert                            00000130
  1584. kill                              0000025B
  1585. lctrl                             00000100
  1586. longdelay                         0000013E
  1587. nocontrol                         00000195
  1588. pagedown                          00000122
  1589. pageup                            00000129
  1590. parity0                           0000022D
  1591. parity1                           0000022F
  1592. prtscreen                         0000010D
  1593. rctrl                             00000103
  1594. readdata                          000003D8
  1595. ready                             000001C5
  1596. resend                            000001D8
  1597. reset                             0000024A
  1598. returnvalue                       0000001D
  1599. say_key                           0000037E
  1600. say_ok                            000003A3
  1601. say_option1                       00000385
  1602. say_option2                       0000038F
  1603. say_reset                         000003AA
  1604. say_select                        0000035C
  1605. say_uk10                          00000398
  1606. sendmessage                       000003B5
  1607. skip1st                           0000021C
  1608. skippy                            0000021E
  1609. smalldelay                        00000144
  1610. start                             00000264
  1611. MPASM 01.30 Released         IBMKEY25.ASM   3-28-1996  11:04:48         PAGE 29
  1612.  
  1613.  
  1614. SYMBOL TABLE
  1615.   LABEL                             VALUE 
  1616.  
  1617. start2                            0000026E
  1618. stop0                             00000231
  1619. stop1                             00000233
  1620. strobe                            00000253
  1621. swapscreen                        00000106
  1622. syncup                            000001CC
  1623. tableoffset                       0000001A
  1624. transok2                          00000166
  1625. transok3                          00000184
  1626. transok4                          0000017D
  1627. waitAT                            00000284
  1628. waitHD                            0000026A
  1629. wait_write                        000003D3
  1630. win95                             00000020
  1631. writedata                         000003C8
  1632.  
  1633.  
  1634. MEMORY USAGE MAP ('X' = Used,  '-' = Unused)
  1635.  
  1636. 0000 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1637. 0040 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1638. 0080 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1639. 00C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1640. 0100 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1641. 0140 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1642. 0180 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1643. 01C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1644. 0200 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1645. 0240 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1646. 0280 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1647. 02C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1648. 0300 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1649. 0340 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1650. 0380 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1651. 03C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXX-- ---------------- ----------------
  1652.  
  1653. All other memory blocks unused.
  1654.  
  1655. Program Memory Words Used:   990
  1656. Program Memory Words Free:    34
  1657.  
  1658.  
  1659. Errors   :     0
  1660. Warnings :     0 reported,     0 suppressed
  1661. Messages :     0 reported,    23 suppressed
  1662.  
  1663.